#ifndef XML_HPP
#define XML_HPP


/**
 * xml class
 * TODO : operator[]
 **/
class Xml
{
	public:
	Xml(char*);
	Xml();
	Xml(char* name,char* value);
	~Xml();
	char* name;
	char* value;
	Xml* children;
	Xml* next;

	char* parseXml(Xml*,char*);
	char* readTag(char*,char*);
	char* readValue(char*,char*);
	char* writeXml(Xml*xml=NULL,int=0);
	void addNode(char* name,char* value=NULL);
	void addChild(char* name,char* value=NULL);
	Xml& operator[](const char*);
};

#endif
